class Answer < ActiveRecord::Base

  belongs_to :user
  belongs_to :task
  has_many :answer_contents

  validates_presence_of :user
  validates_presence_of :task
  validates_presence_of :description
  validates_presence_of :delivered_at
  validates_presence_of :correction_value
  
  validates_uniqueness_of :user_id, :scope => [:task_id]
  
end
